package org.example.service;


import com.baomidou.mybatisplus.extension.service.IService;
import org.example.model.User;

import javax.servlet.http.HttpServletRequest;

/**
* @author 86151
* @description 针对表【user(用户表)】的数据库操作Service
* @createDate 2023-05-26 19:24:07
*/
public interface UserService extends IService<User> {


    /**
     * 用户注册
     *
     * @param userAccount   用户帐户
     * @param password      密码
     * @param checkPassword 检查密码
     * @return long
     */
    long userRegister(String userAccount,String password,String checkPassword,String planetCode);

    /**
     * 做登录
     *
     * @param userAccount 用户帐户
     * @param userPassword    密码
     * @param request     请求
     * @return {@link User}
     */
    User userLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 用户脱敏
     *
     * @param user 用户
     * @return {@link User}
     */
    User getSafetyUser(User user);

    /**
     * 用户注销
     *
     * @param request 请求
     * @return int
     */
    int userLogout(HttpServletRequest request);
}
